﻿#region License

/*
 © 2012 Alex Kazaev
 * FolderDrive project [http://folderdrive.codeplex.com/]
 * Licensed under Ms-PL license [http://www.opensource.org/licenses/MS-PL]
 */

#endregion License

using FolderDrive.Core;

namespace FolderDriveRegistryUtility
{
  internal class Program
  {
    private static int Main(string[] args)
    {
      try
      {
        if (args.Length == 2 && args[0].EndsWith(":"))
        {
          FolderDriveRegistry.CreateDrive(args[0], args[1]);
        }
        else
        {
          if (args.Length == 1 && args[0].EndsWith(":"))
          {
            FolderDriveRegistry.DeleteDrive(args[0]);
          }
          else
          {
            return -1;
          }
        }
      }
      catch
      {
        return -1;
      }

      return 0;
    }
  }
}